<template>

</template>

<script>
    export default {
        data () {
            return {};
        },
        methods: {
            logout () {
               let $this = this;
               this.$api.logout(function(resp){
                   if(resp.code == 0){
                       $this.$toast.success(resp.msg);
                       $this.$router.replace("/login");
                   }else{
                       $this.$toast.error(resp.msg);
                   }
               });
            }
        },
        mounted(){
            this.logout();
        }
    };
</script>
